<?php
//рус
include_once (_CORE_PATH . "module/active_module.php");
class module_admin_std_cli extends active_module_class
{
    public function Init ()
    {
        $this->GetDecorator()->SetTemplate('std');
    }

    public function Auth()
    {
    	$user = $this->GetUser();
        $user->Reset();    	
    	
    	include_once(_APP_PATH. "business/users/users_mapper.php");
    	$usersMapper = UsersMapper::GetInstance($user);

    	$foundUser = $usersMapper->GetSuperUser(); 
    	
        $user->Set(true, $foundUser->GetUserId(), $foundUser->GetUserName(), $foundUser->GetUserGroup(), $foundUser->GetGrantedGroups());
        $user->SetDetails(array('groupName' => $foundUser->GetGroupName() ? $foundUser->GetGroupName() : 'bots'  , 'email' => $foundUser->GetEmail()));     	
    	
    	return $this;
    }    
}